Skip to content

epiphany(board): E-CONTRACT-NO-SERIALIZE-2 — correct #415, the audit event stays inside#417

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/epiphany-contract-no-serialize-refine
May 27, 2026
Merged

epiphany(board): E-CONTRACT-NO-SERIALIZE-2 — correct #415, the audit event stays inside#417
AdaWorldAPI merged 1 commit into
mainfrom
claude/epiphany-contract-no-serialize-refine

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up correction to #415. That PR landed E-CONTRACT-NO-SERIALIZE with the framing "serialization is the outer membrane's job" — the user sharpened it ("why should the audit event go outside?"): the audit event is not membrane traffic at all.

Prepends E-CONTRACT-NO-SERIALIZE-2 (board is append-only, so the prior entry stays intact and is corrected here):

  • The audit event never leaves the inside — it is a cognitive-compliance witness: a merkle-chained event (merkle_root / prev_merkle) that calcifies into SPO + a Lance columnar tombstone (cf. E-LADDER-SERVES-MAILBOX §6). Examined in place — lance-graph is a query engine, so HIPAA §164.312(b) review is a query against the witness, not an export to a SIEM. The merkle chain is the tamper-evidence.
  • No JSON by default; JsonlAuditSink / with_jsonl_audit are a legacy "ship logs to Splunk" pattern this stack obsoletes.
  • The audit sink is inner, not membrane — "emit via the membrane sink" was the wrong prescription.
  • Off-box durability is an infra concern (replicate the Lance/merkle artifact or do a deliberate on-request export), never the sink's standing behavior.

The §1 half of the prior entry (contracts compile types, never serialize; build-time serde codegen is fine) stands unchanged. Corrected lance-graph target: relocate the concrete JsonlAuditSink out of callcenter as an at-most-optional export adapter; the canonical sink is the SPO/Lance witness projection.

Cross-refs MedCare-rs #159 (the consumer-side #7 correction). Board/docs-only.

Test plan

  • Board-only; no build impact.

https://claude.ai/code/session_018FqA8TfgRBHy8zF92kx4TW


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated internal architectural documentation regarding audit event handling and compliance frameworks.

Note: This release contains no changes visible to end-users.

Review Change Stack

…event stays inside

#415 landed E-CONTRACT-NO-SERIALIZE with "serialize at the membrane" —
the user sharpened it ("why should the audit event go outside?"): audit
is not membrane traffic at all. It is a witness (merkle -> SPO + Lance
tombstone), examined in place by the query engine; the merkle chain IS
the tamper-evidence. No JSON by default; the sink is inner, not membrane;
off-box copies are an infra concern, not the sink's standing behavior.

Board is append-only: prepends a correction entry, leaves the prior entry
intact. §1 (contracts compile types, never serialize) stands.

https://claude.ai/code/session_018FqA8TfgRBHy8zF92kx4TW
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR adds a clarifying epiphany entry (E-CONTRACT-NO-SERIALIZE-2) to the design board. It corrects the prior framing by establishing that audit events are in-place, merkle-chained witnesses within the Lance graph—not external membrane traffic—and specifies that JSONL audit sinks should be optional export adapters rather than default trait behavior.

Changes

Audit Event Architecture Clarification

Layer / File(s) Summary
E-CONTRACT-NO-SERIALIZE-2 epiphany entry
.claude/board/EPIPHANIES.md
Appended architectural correction clarifying that audit events remain in-place merkle-chained witnesses (not membrane traffic), rejecting default JSONL emission, and specifying that AuditSink trait + UnifiedAuditEvent contracts stay in core while JsonlAuditSink-style logic relocates as an optional export adapter.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • AdaWorldAPI/lance-graph#415: Prior PR that introduced the original E-CONTRACT-NO-SERIALIZE epiphany entry arguing for the same core/membrane layering separation between trait contracts and concrete JSON sink implementations.

Poem

🐰 A clarity hops through the board,
Merkle chains, not traffic, restored,
Witnesses stay in place, unchained,
JSON adapters, neatly trained—
~The Rabbit of Architectural Thought

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly summarizes the main change: adding a corrective epiphany entry (E-CONTRACT-NO-SERIALIZE-2) that clarifies audit event handling, directly relating to the only change in the changeset (the EPIPHANIES.md file addition).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/epiphany-contract-no-serialize-refine

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/board/EPIPHANIES.md:
- Line 11: Change the sentence to state this as the intended migration target
(not current state): explicitly say that the callcenter module currently still
exports concrete sinks (e.g., JsonlAuditSink) and that the desired target is to
refactor callcenter to expose only the AuditSink trait and UnifiedAuditEvent
type while relocating JsonlAuditSink into lance-graph-callcenter as an optional
adapter, and that the canonical sink should be the SPO/Lance witness projection;
reference JsonlAuditSink, AuditSink, UnifiedAuditEvent, lance-graph-callcenter
and SPO/Lance witness projection in the updated phrasing so readers know these
symbols are the target of the migration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0254c232-acab-4970-bfe6-b88b6daa5462

📥 Commits

Reviewing files that changed from the base of the PR and between c8acf55 and fe17249.

📒 Files selected for processing (1)
  • .claude/board/EPIPHANIES.md

- **The audit sink is inner, not membrane.** It belongs with the SPO/Lance tissue, behind the membrane — never in the outer client-facing layer. "Emit via the membrane sink" (prior entry's "Correct shape") was wrong.
- **Off-box durability / external-auditor copies are an infra concern** — replicate the durable Lance/merkle artifact, or do a deliberate on-request export *action* at the storage edge. Egress as an explicit act on the artifact, never the sink's standing behavior, never the client membrane.

So the lance-graph-side direction stands but with a corrected target: relocate the concrete `JsonlAuditSink` out of `lance-graph-callcenter` as an at-most-optional export adapter; callcenter keeps only the `AuditSink` trait + `UnifiedAuditEvent` type; the **canonical sink is the SPO/Lance witness projection**, not a JSON file at the membrane.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Clarify this as target-state, not current-state.

Line 11 currently reads as if callcenter already “keeps only” trait+type, but code still contains/export-gates concrete sinks (including JsonlAuditSink). Please mark this explicitly as a migration target to avoid architecture drift in follow-up planning.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/board/EPIPHANIES.md at line 11, Change the sentence to state this as
the intended migration target (not current state): explicitly say that the
callcenter module currently still exports concrete sinks (e.g., JsonlAuditSink)
and that the desired target is to refactor callcenter to expose only the
AuditSink trait and UnifiedAuditEvent type while relocating JsonlAuditSink into
lance-graph-callcenter as an optional adapter, and that the canonical sink
should be the SPO/Lance witness projection; reference JsonlAuditSink, AuditSink,
UnifiedAuditEvent, lance-graph-callcenter and SPO/Lance witness projection in
the updated phrasing so readers know these symbols are the target of the
migration.

@AdaWorldAPI AdaWorldAPI merged commit 104c631 into main May 27, 2026
1 check passed
AdaWorldAPI added a commit that referenced this pull request May 28, 2026
…serialize-refine

epiphany(board): E-CONTRACT-NO-SERIALIZE-2 — correct #415, the audit event stays inside
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants